package com.spica.platform.common.utils;

import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

import java.util.Locale;


/**
 * 国际化,查找resource下的messages文件
 */
public class MessageSourceUtil extends ReloadableResourceBundleMessageSource {
	 
	public MessageSourceUtil() {
		setBasename("messages/messages");
		setDefaultLocale(Locale.CHINA);
	}

	public static MessageSourceAccessor getAccessor() {
		return new MessageSourceAccessor(new MessageSourceUtil());
	}

}
